package com.psbc.decorator;

/**
 * @author:y022 01/09/2022 22:33
 * @description:
 */
public class DecoratorTest {
    public static void main(String[] args) {
        DefaultNormalPersonAction defaultNormalPersonAction = new DefaultNormalPersonAction();
        defaultNormalPersonAction.query();
        defaultNormalPersonAction.queryName();
        System.out.println(defaultNormalPersonAction.UpdateName("张小华"));


        DefaultDecoratorAction defaultDecoratorAction = new DefaultDecoratorAction(defaultNormalPersonAction);

        defaultDecoratorAction.query();
        defaultDecoratorAction.queryName();
        System.out.println(defaultDecoratorAction.UpdateName("张小华"));

    }
}
